/**
 * @Author: ly
 * @Description:
 * @Date: 2024/10/22 15:13
 */
package org.ly.controller;

import org.ly.service.KafkaProducerService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/kafka")
public class ProducerController {

    private final KafkaProducerService kafkaProducerService;

    public ProducerController(KafkaProducerService kafkaProducerService) {
        this.kafkaProducerService = kafkaProducerService;
    }

    @RequestMapping(value = "/send")
    public String send() {
        kafkaProducerService.send();
        return "{\"code\":0}";
    }
}
